<?php

namespace App\Http\Requests;


class DictTypeRequest extends BaseRequest
{


    public function rules()
    {
        return [
            'dict_type' => 'required|between:1,100|unique:sys_dict_type,dict_type,'.$this->post('id'),
            'dict_name' => 'required|between:1,100',
            'status' => 'required'
        ];
    }

    public function messages()
    {
        return [
            'dict_type.required' => '字典类型必须填写',
            'dict_type.between' => '字典类型1-100个字符之间',
            'dict_type.unique' => '字典类型已存在',

            'dict_name.required' => '字典名称必须填写',
            'dict_name.between' => '字典名称1-100个字符之间',

            'status.required' => '请选择状态',
        ];
    }
}
